<template>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <!-- 插槽（坑） -->
      <slot></slot>
    </div>
  </div>
</template>

<script>
import comswiper from "swiper";
import "swiper/swiper-bundle.min.css";
export default {
  mounted() {
    this.$nextTick(() => {
      new comswiper(".swiper-container", {
        slidesPerView: 4,
      });
    });
  },
};
// 关于 this.$nextTick() 函数：当当前异步操作全部做完之后再去做其里面的东西。

</script>